package com.gzhryc.net_marketing.cloud.business.dao.db;

import java.util.Date;

import com.gzhryc.common.NumberTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.net_marketing.cloud.business.dao.enums.TeamPayApplyEnum;

@Table(name = "team_pay_apply")
public class TeamPayApply {

	@Id(autoIncrement = 10000)
	@Column
	protected Long id;

	@Column(name = "member_id")
	protected Long memberId;

	@Column(name = "member_nickname",note = "会员昵称")
	protected String memberNickname;

	@Column(name = "member_phone",note = "会员手机号")
	protected String memberPhone;

	@Column(name = "goods_id",notNull = true)
	protected Long goodsId;
	
	@Column(name = "goods_name",notNull = true,length = 64,note = "商品名称")
	protected String goodsName;

	@Column(name="goods_classify",notNull = true,defVal = "1",note = "商品类型，1：实物，2：虚拟")
	protected Integer goodsClassify;

	@Column(name="goods_type_codes",length = 255)
	protected String goodsTypeCodes;

	@Column(name="goods_type_names",length = 255)
	protected String goodsTypeNames;

	@Column(name = "goods_img", length = 128)
	protected String goodsImg;

	@Column(name = "goods_money",note="单个商品零售价格")
	protected Integer goodsMoney;

	@Column(name = "team_pay_money",note="单个商品团拼价格")
	protected Integer teamPayMoney;

	@Column(name = "reward_money", note = "奖励金额")
	protected Integer rewardMoney;

	@Column(name = "team_member_total", notNull = true, defVal = "1", note = "团拼总数")
	protected Integer teamMemberTotal;

	@Column(name = "team_gain_count", notNull = true, defVal = "1", note = "团拼购买数量")
	protected Integer teamGainCount;

	@Column(name = "team_member_count", notNull = true, defVal = "0", note = "当前团拼数量")
	protected Integer teamMemberCount;

	@Column
	protected Integer state;

	@Column(name = "end_date", note = "结束时间")
	protected Date endDate;

	@Column(name = "update_date", autoUpdateTime = true)
	protected Date updateDate;

	@Column(name = "create_date")
	protected Date createDate;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
	}

	public Long getMemberId() {
		return memberId;
	}

	public void setMemberId(Long memberId) {
		this.memberId = memberId;
	}

	public String getMemberNickname() {
		return memberNickname;
	}

	public void setMemberNickname(String memberNickname) {
		this.memberNickname = memberNickname;
	}

	public String getMemberPhone() {
		return memberPhone;
	}

	public void setMemberPhone(String memberPhone) {
		this.memberPhone = memberPhone;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public Integer getGoodsClassify() {
		return goodsClassify;
	}

	public void setGoodsClassify(Integer goodsClassify) {
		this.goodsClassify = goodsClassify;
	}

	public String getGoodsTypeCodes() {
		return goodsTypeCodes;
	}

	public void setGoodsTypeCodes(String goodsTypeCodes) {
		this.goodsTypeCodes = goodsTypeCodes;
	}

	public String getGoodsTypeNames() {
		return goodsTypeNames;
	}

	public void setGoodsTypeNames(String goodsTypeNames) {
		this.goodsTypeNames = goodsTypeNames;
	}

	public String getGoodsImg() {
		return goodsImg;
	}

	public void setGoodsImg(String goodsImg) {
		this.goodsImg = goodsImg;
	}

	public Integer getGoodsMoney() {
		return goodsMoney;
	}

	public void setGoodsMoney(Integer goodsMoney) {
		this.goodsMoney = goodsMoney;
	}

	public Integer getTeamPayMoney() {
		return teamPayMoney;
	}

	public void setTeamPayMoney(Integer teamPayMoney) {
		this.teamPayMoney = teamPayMoney;
	}

	public Integer getRewardMoney() {
		return rewardMoney;
	}

	public void setRewardMoney(Integer rewardMoney) {
		this.rewardMoney = rewardMoney;
	}

	public Integer getTeamMemberTotal() {
		return teamMemberTotal;
	}

	public void setTeamMemberTotal(Integer teamMemberTotal) {
		this.teamMemberTotal = teamMemberTotal;
	}

	public Integer getTeamGainCount() {
		return teamGainCount;
	}

	public void setTeamGainCount(Integer teamGainCount) {
		this.teamGainCount = teamGainCount;
	}

	public Integer getTeamMemberCount() {
		return teamMemberCount;
	}

	public void setTeamMemberCount(Integer teamMemberCount) {
		this.teamMemberCount = teamMemberCount;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getStateName() {
		return TeamPayApplyEnum.State.note(this.state);
	}

	public String getGoodsMoneyStr() {
		return NumberTools.getMoneyStr(this.goodsMoney);
	}
	
	public String getTeamPayMoneyStr() {
		return NumberTools.getMoneyStr(this.teamPayMoney);
	}
}
